﻿//angular.module("qask").controller('AskQuestionController', ['$scope', 'blockUI', 'QuestionService', function ($scope, blockUI, questionService) {

//    $scope.init = function () {
//        $scope.resetPageVariables();
//        $scope.initPageModel();
//    }

//    $scope.resetPageVariables = function() {
//        $scope.saveSuccessfull = false;
//        $scope.saveError = false;
//    }

//    $scope.initPageModel = function() {
//        $scope.questionModel = questionService.questionModel();
//    }

//    $scope.saveQuestion = function () {
//        $scope.resetPageVariables();
//        blockUI.start('Working...');
//        var url = '/questions/create';
//        questionService
//            .save($scope.questionModel, url)
//            .success(function() {
//                blockUI.stop();
//                $scope.saveSuccessfull = true;
//            })
//            .error(function () {
//                $scope.saveError = true;
//                blockUI.stop();
//            });
//    }

//}]);